import isFunction from "./isFunction"
import mountNativeElement from "./mountNativeElement"
import mountComponent from './mountComponent'

export default function mountElement(virtualDOM, container) {
    if (isFunction(virtualDOM)) {
        // 类组件 函数组件
        mountComponent(virtualDOM, container)
    } else {
        // 普通的元素
        mountNativeElement(virtualDOM, container)
    }
}